Tape drive buffer utilization

ABSTRACT

Records and filemarks read from data segments are aggregated into at least one single data segment. The records and the filemarks are reorganized and restructured in the single data segment such that buffer utilization is improved.

FIELD OF THE INVENTION

The present invention relates in general to computers, and moreparticularly to improving the utilization of tape drive buffers byaggregating records and filemarks into a single data segment during readoperations.

In today's society, computer systems are commonplace. Computer systemsmay be found in the workplace, at home, or at school. Computer systemsmay include data storage systems, or disk storage systems, to processand store data. Data storage systems, or disk storage systems, areutilized to process and store data. A storage system may include one ormore disk drives and tape drives. Tape, such as magnetic tape, providesfor physically storing data which may be archived or which may be storedin storage shelves of automated data storage libraries, and accessedwhen required.

SUMMARY OF THE DESCRIBED EMBODIMENTS

In one embodiment, a method is provided improving tape drive efficiency.Records and filemarks read from data segments are aggregated into atleast one single data segment. The records and the filemarks arereorganized and restructured in the single data segment such that bufferutilization is improved.

In another embodiment, a computer system is provided for improving tapedrive efficiency. The computer system includes a computer-readablemedium and a processor in operable communication with thecomputer-readable medium. The processor dynamically aggregates recordsand filemarks that are read from data segments into at least one singledata segment. The records and the filemarks are reorganized andrestructured in the single data segment such that buffer utilization isimproved.

In a further embodiment, a computer program product is provided forimproving tape drive efficiency. The computer-readable storage mediumhas computer-readable program code portions stored thereon. Thecomputer-readable program code portions include a first executableportion that aggregates records and filemarks that are read from datasegments into at least one single data segment. The records and thefilemarks are reorganized and restructured in the single data segmentsuch that buffer utilization is improved.

In addition to the foregoing exemplary method embodiment, otherexemplary system and computer product embodiments are provided andsupply related advantages. The foregoing summary has been provided tointroduce a selection of concepts in a simplified form that are furtherdescribed below in the Detailed Description. This Summary is notintended to identify key features or essential features of the claimedsubject matter, nor is it intended to be used as an aid in determiningthe scope of the claimed subject matter. The claimed subject matter isnot limited to implementations that solve any or all disadvantages notedin the background.

BRIEF DESCRIPTION OF THE DRAWINGS

In order that the advantages of the invention will be readilyunderstood, a more particular description of the invention brieflydescribed above will be rendered by reference to specific embodimentsthat are illustrated in the appended drawings. Understanding that thesedrawings depict embodiments of the invention and are not therefore to beconsidered to be limiting of its scope, the invention will be describedand explained with additional specificity and detail through the use ofthe accompanying drawings, in which:

FIG. 1 is a block diagram of an exemplary embodiment of tape drivesystem in which aspects of the present invention may be realized;

FIG. 2 is a block diagram of an exemplary embodiment illustratingcorrespondence between a buffer and data sets on a tape in which aspectsof the present invention may be realized;

FIG. 3 is a flowchart illustrating an exemplary method for aggregatingmultiple datasets into a single data set which aspects of the presentinvention may be realized;

FIG. 4 is a block diagram of an exemplary embodiment for aggregatingmultiple datasets into a single data set which aspects of the presentinvention may be realized; and

FIG. 5 is an additional block diagram of an exemplary sample embodimentfor aggregating multiple datasets into a single data set which aspectsof the present invention may be realized.

DETAILED DESCRIPTION OF THE DRAWINGS

With increasing demand for faster, more powerful and more efficient waysto store information, optimization of storage technologies is becoming akey challenge, particularly in tape drives. In magnetic storage systems,data is read from and written onto magnetic recording media utilizingmagnetic transducers commonly. Data is written on the magnetic recordingmedia by moving a magnetic recording transducer to a position over themedia where the data is to be stored. The magnetic recording transducerthen generates a magnetic field, which encodes the data into themagnetic media. Data is read from the media by similarly positioning themagnetic read transducer and then sensing the magnetic field of themagnetic media. Read and write operations may be independentlysynchronized with the movement of the media to ensure that the data canbe read from and written to the desired location on the media.

In a tape drive system, magnetic tape is moved over the surface of thetape head at high speed. Usually the tape head is designed to minimizethe spacing between the head and the tape. The spacing between themagnetic head and the magnetic tape is crucial so that the recordinggaps of the transducers, which are the source of the magnetic recordingflux, are in near contact with the tape to effect writing sharptransitions, and so that the read element is in near contact with thetape to provide effective coupling of the magnetic field from the tapeto the read element.

An application for the tape device also has a small catalog data writtenat a beginning of partition (BOP). The application/usage is anasynchronously accessed volume so that multiple hosts may read andaccess the tapes without a central software (e.g., central software thatcould keep a copy of the catalog). A typical read/access operation is tolocate to the BOP, read the catalog, then locate the data desired to beread, and then read the data. This creates a significant amount of “backand forth” traffic (e.g., BOP motion) if multiple hosts attempt tosimultaneously access the tape. To improve the performance of the amountof “back and forth” traffic (e.g., BOP motion), tape drives may keep asmall catalog at the BOP as cache, when the tape is loaded. Even thougha host access process is to locate the BOP, read the catalog, and thenlocate the data, the cache for a small catalog eliminates the tapemotion to “locate to the BOP” and “locate to the data from BOP.” Thecache for the BOP has a significant advantage to this application/usage.

When a host writes/reads data to a tape drive, the unit to betransferred to/from tape drive from/to host is recorded and isstandardized by SCSI command. For a Linear Tape Open (LTO) format,multiple records are compressed and chunked to the fixed size unit=DS(DataSet) (e.g. 3 MB) to write/read to/from the tape. The small catalogconsists of a number of records and/or filemarks, such as 2 sets of 80bytes record and filemark (filemark is a tag which is inserted by WriteFilemark command in SCSI). When the application writes a small catalogto the tape at the BOP, the application issues these 2 sets of recordsand filemarks by SCSI write and Write Filemark (WriteFM) commands. Thecontent of datasets to be written will be different by the option ofWrite Filemark command. Write Filemark command has the option (immediateand non-immediate). When non-immediate is specified, the tape driveflushes all of the unwritten data into a buffer. When immediate isspecified, the filemark will be added followed by the previous record.In other words, the image of small catalog to be written to the tapewill be varied by the option of a Write Filemark command. For example,consider the two following examples, as further illustrated in FIG. 5.

Sample #1:

Write 80 bytes, WriteFM 1 (non-immed), Write 80 bytes, WriteFM 1(non-immed)<------------DS#1------------> <------------DS#2------------><REC#0> <FM> <-------Pad------>> <REC#1> <FM> <-------Pad------->

Sample #2:

Write 80 bytes, WriteFM 1(immed), Write 80 bytes, WriteFM 1(immed),WriteFM 0 (non-immed)<------------DS#------------> <REC#0> <FM> <REC#1><FM> <--Pad->,

where the “Pad” in the above illustration means padding. When anon-immediate option is specified, the tape drive needs to flush all ofunwritten data to the tape, even though DS is not fully filled by arecord or filemark, since the LTO formats need to write the dataset onthe tape. The sample #1 case means that the small catalog will bewritten to the DS#1 and DS#2. A straight forward implementation ofhardware is a buffer on the drive is divided by dataset size and itconstructs a ring buffer, as described in FIG. 2, below. With thisimplementation, if the full image of datasets are kept, which containsthe small catalog, then 2 times (e.g., 2 x's) the dataset size area isrequired on the drive buffer. There is a high penalty to keep 2 times(e.g., 2 x's) the dataset in the drive buffer to maintain merely just 80times 2 (e.g., 80*2) bytes and 2 times (e.g., 2 x's) filemark (1filemark=4 bytes).

Thus, to improve the utilization of tape drive buffers, in oneembodiment, the present invention provides a solution for improvedutilization of tape drive buffers by aggregating records and filemarksinto a single data segment during read operations from multiple datasetswhen multiple datasets are read from tape. Then the present inventioncontributes the utilization of the buffer area to keep multiple datasetthat are padded as cache. In one embodiment, aggregating the records andfilemarks from multiple datasets when a dataset is read from tape maycontribute to another case (e.g., a different case from the cache forBOP). For example, if multiple datasets are padded (e.g, if a hostapplication issues a WriteFM command with non-immediate optionfrequently to ensure the transferred data is written to the tape), theutilization of a buffer will be worse by padding the area. However, byperforming the aggregation, the utilization of the buffer will beimproved. The tape drive more efficiently is enabled to find the targetrecord (which the host application wants to read) in the buffer muchmore than a straight forward implementation, as described above. Forexample, assume a DS size is 3 MB and the buffer size is 300 MB. Withthe aggregation process, the tape drive may store the 100 datasets onbuffer. If a dataset only contains 1 times (e.g. 1*) 1 MB records, thedrive may immediately (without tape motion) return 100 records (100 MB)to the host that are available in the drive buffer. However, if theproposal method is available (e.g., records are aggregated in a singledataset as much as possible when the drive read from tape) and 1 datasetcontains 3*1 MB, the tape drive can immediately return 3*1*100 records(300 MB).

As mentioned, the records and filemarks are aggregated from multiplepadded datasets and the records and filemarks are stored on the drivebuffer as single dataset image. In other words, the records and thefilemarks are sequentially aggregated into at least one single datasegment. The single data segment is then padded, but the padding is lessthan the padded data of the multiple datasets. For example, if the endof the single data segment is padded, than the padding of the data insingle data segment is less than the padding of the records and thefilemarks in the multiple data segments. For example, the aggregation ofthe present invention described herein may be based on the LTO format.In one embodiment, the records and filemarks are not aggregated intosingle datasets if the attributes for encryption data of each of therecords are not same. For example, the LTO format does not allow themultiple records and filemarks to be aggregated if the attributes ofencryption are different. When the 2 padded datasets are read from tape(e.g., DS#N=Plain and DS#N+1=Encrypted), the attributes are not thesame. In such a scenario, the present invention does not aggregate thesedatasets to a single dataset image. In other words, if during theprocess of aggregating the records and the filemarks into the singledata set, several of the records and the filemarks contain attributesthat are different than the previous sequentially aggregated recordsand/or filemarks, than the present invention may aggregate the recordsand the filemarks having the different attributes (e.g, differentattributes for encryption data) into an alternative single data segment.Thus, each single data segment contains only the records and filemarksthat are read from the multiple data sets, that have the same attributes(e.g., the same attributes of encryption). The present invention alsoaggregates only on read operations on the tape. Moreover, if the singledata segment has reached a full capacity while aggregating, anadditional single data segment may be added for continuing theaggregating the records and the filemarks.

FIG. 1 is a block diagram of an exemplary embodiment of tape drivesystem 100 in which aspects of the present invention may be realized.While one specific implementation of a tape drive is shown in FIG. 1, itshould be noted that the embodiments described herein may be implementedin the context of any type of tape drive system. The tape drive 100includes a tape 14 a, a head 14 b, reels 14 c and 14 d, a cartridge 14 ehaving a cartridge memory (CM) 25, a motor 150, a controller 160, aheadposition control system 170 and a motor driver 185. As shown, the tapedrive 100 includes an interface 110 for communicating with the host 105,a controller (including at least one processor device) 160 forcontrolling many functions of the drive 100, and a buffer 120 forstoring data. The host 105 communicates with the interface 110 via knowninterface standards. For example, a communication standard employedbetween the host 105 and interface 110 may be Small Computer SystemInterface (SCSI). When the SCSI standard is employed, thewriting/reading of data to the buffer 120 corresponds to a write and/orread command and the writing and/or reading of data from the buffer tothe tape corresponds to a write Filemark (FM) or Synchronous Request(Sync) command. The host 105 transmits commands to the tape drive 100via the interface 110 for reading and writing data. Commands transmittedby the host 105 may be writing of data to the buffer or writing of datafrom the buffer to a magnetic tape 14.

As noted above, various embodiments have two or more tape storageapparatuses, which may each be a tape drive 100. Communication betweenthe two tape drives may be via any suitable connection, such as anEthernet connection. The buffer 120 may be a memory for accumulatingclusters of variable-length data 10 (see FIG. 2) to be written onto thetape 14 a and may be Dynamic Random Access Memory (DRAM) or any othersuitable memory, for storing data to be written to the tape 14 and forstoring data read from the tape 14. The buffer 120 may be separated infixed-length segments 20, as shown in FIG. 2. The data cluster 10 (seeFIG. 2) with an arbitrary length is transferred from the host 105 to thedrive. The data capacity of the segments 20 (see FIG. 2) may differdepending upon the size of the memory device, or devices, comprising thebuffer 120 and the type of tape drive 100, among various other factorsfor example. An exemplary buffer 120 may comprise a plurality ofsegments 20 (see FIG. 2), with each segment 20 (see FIG. 2) configuredto retain approximately 500K bytes of data. Alternatively each segment20 (see FIG. 2) may have a data capacity of about 2 MB. The buffer 120may function as a ring buffer, wherein data is stored into each segment20 (see FIG. 2) sequentially and the ring buffer receives data up to thelast segment and then starts to receive data from the first segmentagain, to be discussed thoroughly hereinafter. The buffer 120 is calleda ring buffer in the sense that it receives data up to the last segmentand then starts to receive data from the first segment again. Onesegment 20 (see FIG. 2) corresponds to one data set on the tape 14 a or30 (see FIG. 2). One data set 40 (see FIG. 2) may be constituted by apart of one data cluster or multiple data clusters sent from the host105.

The writing/reading timing is when a segment is completely filled withdata and when an area unfilled with data in a segment is filled by datapadding in response to a synchronization request from the host. In thisspecification, these two cases in which a segment is filled with datamay be expressed as a segment having been “prepared”. With continuedreference to FIG. 2, the tape 14 a is a tape medium useful for recordingdata. Data transferred via the recording channel 130 is written onto thetape 14 a by the head 14 b as a data set 40 (see FIG. 2). The tape 14 ais wound around the reels 14 c and 14 d, and laterally moves from thereel 14 c toward the reel 14 d, or vice versa accompanying theirrotation.

The cartridge 14 e may include a container for containing the reel 14 caround which the tape 14 a is wound. The same cartridge as the cartridge14 e may be provided to contain the reel 14 d. The motor 150 rotates thereels 14 c and 14 d. The tape cartridge 14 is provided with acontactless nonvolatile memory called a cartridge memory (CM) 25therein. The tape drive 100 contactlessly reads from and writes to theCM 25. The tape drive updates tape directory information (attributeinformation about written data) in the CM 25. When reading data, thetape drive refers to the information included in the CM 25 and moves thetape to a destination position at a high speed to enable alignment.

The controller 160 controls the whole tape drive 100. The controller 160controls writing/reading of data to/from the tape 14 a in accordancewith a command received by the interface 110 from the host 105. Thecontroller also controls the head position control system 170 and themotor driver 185. The head position control system 170 traces a desiredone or multiple wraps, or sets of multiple tracks. When it becomesnecessary for the head 14 b to switch the track, the head positioncontrol system 170 performs control to electrically switch the head 14b. The motor driver 185 may be directly connected to the controller 160.

Using some of components of FIG. 1, FIG. 2 is a block diagram 200 of anexemplary embodiment illustrating correspondence between a buffer anddata sets on a tape in which aspects of the present invention may berealized. As shown, FIG. 1 illustrates correspondence between a buffer120 (see FIG. 1) and read data (data sets) on a tape 14 (see FIG. 1). Abuffer 120 (see FIG. 1) is in the forth of a ring divided infixed-length segments 20. Multiple variable-length data clusters 10 sentfrom a host a sequentially accumulated in a segment 20. The segment 20may be completely filled with data read from a data set 40 of a tape 14.The data sets 40 are sequentially read from the tape 30 into eachsegment 20 of the buffer 120. Duplicate data or null data is preventedfrom being transferred from a host 105 by the controller 160 reading anend marker (not shown) of a dataset 40 that immediately precedes adataset 40 with an invalidation flag. This may be either the first endmarker of a dataset 40 immediately preceding a null dataset or thesecond end marker of a null dataset 40 immediately preceding a duplicatedataset 40.

In one embodiment, the buffer on tape drive is divided into datasetswith a particular size. Each dataset unit is called segment. Asmentioned above, a buffer consists of ring buffer (e.g., having asegment #0 up to a segment# N−1). When the dataset #n is read from tape,the image of dataset is stored in either of segment #x (e.g.,0<=x<=N−1). Next, when the dataset #n+1 is read from tape, the image ofdataset #n+1 is stored in segment # (x+1) % N (where “%” means themodulo). In order to keep the small catalog at the BOP in the buffer ascache, the ring buffer is divided into 0 to #N−2 segments. Segment# N isreserved for cache. The small catalog (is stored at BOP) may becontained in 4 datasets from the BOP. When a dataset is read from tape,and is stored in segment #x, and the dataset number is from 1 to 4(e.g., the dataset has a number which is assigned from one origin fromthe BOP) then microcode starts aggregating the image of dataset from thesegment #x, #x+1, #x+2, #x+4, and on to segment #N as illustrated belowin FIG. 3. It should be noted that FIG. 3 limits the number of multipledatasets for aggregation to 4, but this may be expanded based on userpreference, and is only provided by way of example.

FIG. 3 is a flowchart illustrating an exemplary method 300 foraggregating multiple datasets into a single data set which aspects ofthe present invention may be realized. The method begins by reading abeginning of partition (BOP) (step 302). The method 300 determines theamount of multiple datasets (e.g., determines if the multiple datasetsare from 0 to 4) (step 304). If there are not multiple datasets, themethod 300 ends (step 316). If yes, the method 300 determines if themultiple dataset has valid data (step 306). If no, the method 300 ends(step 316). If yes, the method 300 determines if the attributes are thesame as the previous multiple datasets (step 308). If no, the method 300ends (step 316). If yes, the method 300 then determines if a cache hasremaining capacity (step 310). If no, the method 300 ends (step 316). Ifyes, the method 300 copies the multiple datasets by a small chunk unit(step 312). The method 300 then determines if the end of the datasetshas been reached (step 314). If no, the method 300 returns to step 310and determines if a cache has remaining capacity (step 310). If yes, themethod 300 returns to step 304, and the next dataset copy is startedwith the method determining the amount of multiple datasets (step 304).

FIG. 4 is a block diagram 400 of an exemplary embodiment for aggregatingmultiple datasets into a single data set which aspects of the presentinvention may be realized. As illustrated in FIG. 4, segment #x (e.g.,DS#1) 402 a, segment #x+1 (e.g., DS#2) 402 b, segment #x+2 (e.g., DS#3)402 c, and segment #x+4 (e.g., DS#4) 402 n are shown having records andfilemarks that are aggregated from multiple padded datasets and therecords and filemarks are stored on the drive buffer as single datasetimage (e.g into a single data segment). By way of example only, Segment#x (e.g., DS#1) 402 a has a record labeled in FIG. 4 as R#0. Segment#x+1 (e.g., DS#2) 402 b has a filemarker labeled in FIG. 4 as FM#0.Segment #x+2 (e.g., DS#3) 402 c has a record labeled in FIG. 4 as R#1.Segment #x+4 (e.g., DS#4) 402 n has a filemarker labeled in FIG. 4 asFM#1. These segments 404 are contained within the ring buffer (see FIG.2).

However, the records R#0 and R#1 and the filemarks FM#0 and FM#1 aresequentially aggregated into at least one single data segment 404,outside of the ring buffer. The single data segment 404 is then padded(labeled in the single data segment 404 as “pad”, but the padded data inthe single data segment 404 is less than the padded data of the multipledatasets 402. In one embodiment, the records and filemarks are notaggregated into single datasets if the attributes for encryption data ofeach of the records are not the same. As mentioned above, if during theprocess of aggregating the records and the filemarks into the singledata set, several of the records and the filemarks contain attributesthat are different than the previous sequentially aggregated recordsand/or filemarks, than the present invention may aggregate the recordsand the filemarks having the different attributes for the encryptiondata into an alternative single data segment. Thus, each single datasegment contains only the records and filemarks that are read from themultiple data sets, that have the same attributes (e.g., the sameattributes of encryption). The present invention also aggregates only onread operations on the tape. Moreover, if the single data segment hasreached a full capacity while aggregating, an additional single datasegment may be added for continuing the aggregating the records and thefilemarks.

FIG. 5 is an additional block diagram of an exemplary sample embodimentfor aggregating multiple datasets into a single data set which aspectsof the present invention may be realized. As mentioned above, when ahost writes/reads data to tape drive, the unit to be transferred to/fromtape drive from/to host is recorded and is standardized by SCSI command.For a Linear Tape Open (LTO) format, multiple records are compressed andchunked to the fixed size unit=DS (DataSet) (e.g. 3 MB) to write/readto/from tape. The small catalog consists of 2 sets of 80 bytes recordand filemark (filemark is a tag which is inserted by a Write Filemarkcommand in SCSI). When the application writes a small catalog to thetape at the BOP, the application issues these 2 sets of records andfilemarks by an SCSI write and Write Filemark (WriteFM) commands. Thecontent of datasets to be written will be different by the option ofWrite Filemark command. Write Filemark command has the option (immediateand non-immediate). When non-immediate is specified, the tape driveflushes all of the unwritten data into a buffer. When immediate isspecified, the filemark will be added followed by the previous record.In other words, the image of small catalog to be written to the tapewill be varied by the option of the Write Filemark command. For example,consider the two following examples, as further illustrated in FIG. 5.Sample #1 502A and 502B:

Write 80 bytes, WriteFM 1 (non-immed), Write 80 bytes, WriteFM 1(non-immed)<------------DS#1------------> <------------DS#2------------><REC#0> <FM> <-------Pad------> <REC#1> <FM> <-------Pad------->

Sample #2 504:

Write 80 bytes, WriteFM 1(immed), Write 80 bytes, WriteFM 1(immed),WriteFM 0 (non-immed)<------------DS#1------------> <REC#0> <FM> <REC#1><FM> <--Pad->,

where the “Pad” in the above illustration means padding, REC is record,and FM is a filemark. When a non-immediate option is specified, the tapedrive needs to flush all of unwritten data to tape, even though DS isnot fully filled by a record or filemark, since LTO formats need towrite the dataset on tape. The sample #1 case means that a small catalogwill be written to the DS#1 502A and DS#2 502B. A straight forwardimplementation of hardware is the buffer on the drive is divided bydataset size and it constructs a ring buffer, as described in FIG. 2.With this implementation, if the full image of datasets are kept, whichcontains the small catalog, then 2 times (e.g., 2 x's) the dataset sizearea is required on the drive buffer. There is a high penalty to keep 2times (e.g., 2 x's) dataset in the drive buffer to maintain merely just80 times 2 (e.g., 80*2) bytes and 2 times (e.g., 2 x's) filemark (1filemark=4 bytes).

Thus, to improve the utilization of tape drive buffers, in oneembodiment, the present invention provides a solution for improvedutilization of tape drive buffers by aggregating records and filemarksinto a single data segment 504 during read operations from multipledatasets 502A and 502B when multiple datasets are read from tape. Therecords and filemarks are aggregated from multiple padded datasets 502Aand 502B and the records and filemarks are stored on the drive buffer assingle dataset image 504. In other words, the records and the filemarksare sequentially aggregated into at least one single data segment. Thesingle data segment is then padded, but the padding is less than thepadded data of the multiple datasets. For example, if the end of thesingle data segment is padded, than the padding of the data in singledata segment 504 is less than the padding of the records and thefilemarks in the multiple data segments 502A and 502B. For example, theaggregation of the present invention described herein may be based onthe LTO format. In one embodiment, the records and filemarks are notaggregated into single datasets if the attributes for encryption data ofeach of the records are not same.

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain, or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wired, optical fiber cable, RF, etc., or any suitable combination of theforegoing. Computer program code for carrying out operations for aspectsof the present invention may be written in any combination of one ormore programming languages, including an object oriented programminglanguage such as Java, Smalltalk, C++ or the like and conventionalprocedural programming languages, such as the “C” programming languageor similar programming languages. The program code may execute entirelyon the user's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention have been described above withreference to flowchart illustrations and/or block diagrams of methods,apparatus (systems) and computer program products according toembodiments of the invention. It will be understood that each block ofthe flowchart illustrations and/or block diagrams, and combinations ofblocks in the flowchart illustrations and/or block diagrams, can beimplemented by computer program instructions. These computer programinstructions may be provided to a processor of a general purposecomputer, special purpose computer, or other programmable dataprocessing apparatus to produce a machine, such that the instructions,which execute via the processor of the computer or other programmabledata processing apparatus, create means for implementing thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks. The computer program instructions may also beloaded onto a computer, other programmable data processing apparatus, orother devices to cause a series of operational steps to be performed onthe computer, other programmable apparatus or other devices to produce acomputer implemented process such that the instructions which execute onthe computer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

The flowchart and block diagrams in the above figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

While one or more embodiments of the present invention have beenillustrated in detail, the skilled artisan will appreciate thatmodifications and adaptations to those embodiments may be made withoutdeparting from the scope of the present invention as set forth in thefollowing claims.

What is claimed is:
 1. A method for improving tape drive efficiencyusing a processor device, the method comprising: aggregating records andfilemarks, the aggregating restricted to being performed only on readoperations, from a plurality of data segments into at least one singledata segment, the records and the filemarks reorganized and restructuredin the at least one single data segment such that buffer utilization isimproved.
 2. The method of claim 1, further including, sequentiallyaggregating the records and the filemarks into the at least one singledata segment.
 3. The method of claim 1, further including padding an endof the at least one single data segment, wherein the padding of the endof the at least one single data segment is less than padding of therecords and the filemarks in the plurality of data segments.
 4. Themethod of claim 1, wherein the aggregating the records and the filemarksfurther includes aggregating the records and the filemarks into the atleast one single data segment for only the records and the filemarkshaving similar attributes.
 5. The method of claim 4, further includingaggregating the records and the filemarks having different attributesinto an alternative one of the least one single data segment.
 6. Themethod of claim 1, further including, if the at least one single datasegment has reached a full capacity while aggregating, adding anadditional one of the least one single data segment for continuing theaggregating the records and the filemarks.
 7. The method of claim 1,further including aggregating the records and the filemarks into a drivebuffer as the at least one single data segment.
 8. The method of claim1, further including aggregating the records and the filemarks having asimilar attribute into the at least one single data segment.
 9. A systemfor improving tape drive efficiency, the system comprising: a tape, thetape drive, in communication with the tape head, a plurality of buffersin communication with the tape and the tape drive, and a processordevice, controlling the plurality of buffers, the tape, and the tapedrive, wherein the processor device: aggregates records and filemarks,the aggregating restricted to being performed only on read operations,from a plurality of data segments into at least one single data segment,the records and the filemarks reorganized and restructured in the atleast one single data segment such that buffer utilization is improved.10. The system of claim 9, wherein the processor device sequentiallyaggregates the records and the filemarks into the at least one singledata segment.
 11. The system of claim 9, wherein the processor devicepads an end of the at least one single data segment, wherein the paddingof the end of the at least one single data segment is less than paddingof the records and the filemarks in the plurality of data segments. 12.The system of claim 9, wherein the processor device aggregates therecords and the filemarks into the at least one single data segment foronly the records and the filemarks having similar attributes.
 13. Thesystem of claim 12, wherein the processor device aggregates the recordsand the filemarks having different attributes into an alternative one ofthe least one single data segment.
 14. The system of claim 9, whereinthe processor device, if the at least one single data segment hasreached a full capacity while aggregating, adding an additional one ofthe least one single data segment for continuing the aggregating therecords and the filemarks.
 15. The system of claim 9, wherein theprocessor device aggregates the records and the filemarks into a drivebuffer as the at least one single data segment.
 16. The system of claim9, wherein the processor device aggregates the records and the filemarkshaving a similar attribute into the at least one single data segment.17. A computer program product for improving tape drive efficiency by aprocessor device, the computer program product comprising anon-transitory computer-readable storage medium having computer-readableprogram code portions stored therein, the computer-readable program codeportions comprising: a first executable portion that aggregates recordsand filemarks, the aggregating restricted to being performed on onlyread operations, from a plurality of data segments into at least onesingle data segment, the records and the filemarks reorganized andrestructured in the at least one single data segment such that bufferutilization is improved.
 18. The computer program product of claim 17,further including a second executable portion that sequentiallyaggregates the records and the filemarks into the at least one singledata segment.
 19. The computer program product of claim 17, furtherincluding a second executable portion that pads an end of the at leastone single data segment, wherein the padding of the end of the at leastone single data segment is less than padding of the records and thefilemarks in the plurality of data segments.
 20. The computer programproduct of claim 17, further including a second executable portion thataggregates the records and the filemarks into the at least one singledata segment for only the records and the filemarks having similarattributes.
 21. The computer program product of claim 20, furtherincluding a third executable portion that aggregates the records and thefilemarks having different attributes into an alternative one of theleast one single data segment.
 22. The computer program product of claim17, further including a second executable portion that, if the at leastone single data segment has reached a full capacity while aggregating,adding an additional one of the least one single data segment forcontinuing the aggregating the records and the filemarks.
 23. Thecomputer program product of claim 17, further including a secondexecutable portion that aggregates the records and the filemarks into adrive buffer as the at least one single data segment.
 24. The computerprogram product of claim 17, further including a second executableportion that aggregates the records and the filemarks having a similarattribute into the at least one single data segment.